<!--  -->
<template>
  <div
    class="detail"
    v-show="showDetial"
  >
    <div class="detail-wrapper clearfix">
      <div class="detail-main">
        <h1 class="name">测试测试</h1>
        <div class="star-wrapper">
          <star
            :size="48"
            :score="3.6"
          ></star>
        </div>
        <div class="title">
          <div class="line"></div>
          <div class="text">测试测试</div>
          <div class="line"></div>
        </div>
      </div>
    </div>
    <div
      class="detail-close"
      @click="showFloating"
    >
      <i class="icon-close"></i>
    </div>
  </div>
</template>
<script>
import star from '@/components/star/star'

export default {
  props: {
    showDetial: Boolean
  },
  name: 'floating',
  components: { star },
  data () {
    return {}
  },
  methods: {
    showFloating () {
      // this.showDetial = !this.showDetial
      this.$emit('showFloating', this.showDetial)
    }
  }
}
</script>
<style lang="stylus" rel="stylesheet/stylus" scoped>
.detail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(7, 17, 27, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;

  .detail-wrapper {
    min-height: 100%;
    width: 100%;

    .detail-main {
      margin-top: 64px;
      padding-bottom: 64px;

      .star-wrapper {
        margin-top: 18px;
        padding: 2px;
        text-align: center;
      }

      .title {
        display: flex;
        width: 80%;
        margin: 28px auto 24px auto;
        color: rgb(255, 255, 255);

        .line {
          flex: 1;
          position: relative;
          top: -20px;
          border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .text {
          padding: 12px;
          font-size: 14px;
          font-weight: 700;
        }
      }

      .name {
        line-height: 16px;
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: rgb(255, 255, 255);
      }
    }
  }

  .detail-close {
    position: relative;
    width: 32px;
    height: 32px;
    margin: -64px auto 0 auto;
    clear: both;
    font-size: 32px;
  }
}
</style>
